﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AMDev.BNET.ClientAPI.WoW
{
    public class CommunityAPIClientEventArgs
        : EventArgs
    {
        #region Properties

        /// <summary>
        /// REST Service response. Useful for debug or value check.
        /// </summary>
        public String RESTResponse
        {
            get;
            protected set;
        }

        public bool Cancelled
        {
            get;
            protected set;
        }

        public bool Error
        {
            get;
            protected set;
        }

        public Exception ErrorException
        {
            get;
            protected set;
        }

        #endregion

        #region .ctor

        protected CommunityAPIClientEventArgs(String restResponse)
        {
            this.RESTResponse = restResponse;
        }

        protected CommunityAPIClientEventArgs(bool cancelled, bool error, Exception exc)
        {
            this.Cancelled = cancelled;
            this.Error = error;
            this.ErrorException = exc;
        }

        #endregion
    }
}
